import Vue from 'vue'
import VueRouter from 'vue-router'
import Department from "@/views/medicalService/Department";
import Hospital from "@/views/medicalService/Hospital/Hospital";
import ShowHospital from "@/views/medicalService/Hospital/ShowHospital";
import SaveHospital from "@/views/medicalService/Hospital/SaveHospital";
import Docker from "@/views/medicalService/Docker/Docker";
import Disease from "@/views/medicalService/Disease";
import TestInstitution from "@/views/medicalService/TestInstitution";
import SaveDocker from "@/views/medicalService/Docker/SaveDocker";
import ShowDocker from "@/views/medicalService/Docker/ShowDocker";
import Login from "@/views/Login";
import Manager from '@/views/system/Manager'
import Account from '@/views/system/Account'
import User from '@/views/system/User'
import Permission from "@/views/system/Permission";
import Role from "@/views/system/Role";
import UserCount from "@/views/system/UserCount";
import HealthCount from "@/views/system/HealthCount";
import RegisterCount from "@/views/system/RegisterCount";
import Inquiry from "@/views/system/Inquiry";
import SalesCount from "@/views/system/SalesCount";
import Home from '@/views/Home';
import Category from "@/views/mallSystem/Category";
import CategoryDetails from "@/views/mallSystem/CategoryDetails";
import Commodity from "@/views/mallSystem/Commodity";
import AddCommodity from "@/views/mallSystem/AddCommodity";
import Order from "@/views/mallSystem/Order";


Vue.use(VueRouter)

const routes = [
    {path: '/', name: 'Login', component: Login},
    {path: '/login', name: 'Login', component: Login},

    //医疗服务
    {path: '/department', name: 'Department', component: Department},
    {path: '/hospital', name: 'Hospital', component: Hospital},
    {path: '/showHospital', name: 'ShowHospital', component: ShowHospital},
    {path: '/saveHospital', name: 'SaveHospital', component: SaveHospital},
    {path: '/docker', name: 'Docker', component: Docker},
    {path: '/docker', name: 'Docker', component: Docker},
    {path: '/saveDocker', name: 'SaveDocker', component: SaveDocker},
    {path: '/showDocker', name: 'ShowDocker', component: ShowDocker},
    {path: '/testInstitution', name: 'TestInstitution', component: TestInstitution},

    {
        path: '/home', name: 'Home', component: Home,
        children: [
            {path: '/category', component: Category},
            {path: '/categoryDetails/:id', component: CategoryDetails},
            {path: '/commodity', component: Commodity},
            {path: '/addCommodity', component: AddCommodity},
            {path: '/order', component: Order},
            {path: '/department', name: 'Department', component: Department},
            {path: '/hospital', name: 'Hospital', component: Hospital},
            {path: '/showHospital', name: 'ShowHospital', component: ShowHospital},
            {path: '/saveHospital', name: 'SaveHospital', component: SaveHospital},
            {path: '/docker', name: 'Docker', component: Docker},
            {path: '/saveDocker', name: 'SaveDocker', component: SaveDocker},
            {path: '/showDocker', name: 'ShowDocker', component: ShowDocker},
            {path: '/disease', name: 'Disease', component: Disease},
            {path: '/testInstitution', name: 'TestInstitution', component: TestInstitution},
            {path: "/managerList", name: 'Manager', component: Manager},
            {path: "/accountList", name: 'Account', component: Account},
            {path: "/userList", name: 'User', component: User},
            {path: "/permissionList", name: 'Permission', component: Permission},
            {path: "/sysrole", name: 'Role', component: Role},
            {path: "/userCount", name: 'UserCount', component: UserCount},
            {path: "/healthCount", name: 'HealthCount', component: HealthCount},
            {path: "/registerCount", name: 'RegisterCount', component: RegisterCount},
            {path: "/inquiryCount", name: 'Inquiry', component: Inquiry},
            {path: "/salesCount", name: 'SalesCount', component: SalesCount}
        ]
    },

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
